Embodiments of the inventive subject matter generally relate to the field of networking, and, more particularly, to sharing buffer space in link aggregation configurations.
Link aggregation configurations, such as 802.3ad, increase network throughput on a server by interconnecting multiple network interface cards (NICs). If there is a number N of interconnected NICs on a server, the server can transmit N data packets simultaneously. Although transmit time is reduced by a factor of N, central processing unit (CPU) usage is not reduced for link aggregation configurations as compared to the number N of independent interfaces.
An operating system uses one of two techniques to pass packets to be transmitted to an interface. The first technique is to copy data packets into memory locations that have been pre-registered as buffer space for the interface. Pre-registration of buffer space occurs when the operating system configures the interface at startup. Pre-registration of buffer space comprises allocating a block of memory to the interface to allow direct memory access (DMA) to the data packets. The second technique is to register the memory location of the packet on-the-fly with the interface. Instead of setting up a block of memory for the interface to access at startup, the operating system allocates the memory as needed. The allocation of memory is usually temporary and each packet memory location is registered on-the-fly.
Once the memory is registered, the packet data is retrieved by DMA. For example, an operating system may pass down a packet to a first NIC in a link aggregation configuration, but load balancing techniques for the configuration may determine that the packet should be transmitted by a second NIC instead of the first NIC. The packet is either copied from the buffer space of the first NIC to the buffer space of the second NIC, or the location in the buffer space of the first NIC must be DMA registered with the second NIC on-the-fly.